﻿/*
 * 作者：新生命开发团队（http://www.newlifex.com/）
 * 
 * 版权：版权所有 (C) 新生命开发团队 2002-2014
*/

using System;
using System.Xml.Serialization;

namespace CuteAnt.Messaging
{
	/// <summary>字符串消息。封装一个字符串，UTF8编码。</summary>
	public class StringMessage : Message
	{
		#region -- 属性 --

		/// <summary>消息类型</summary>
		[XmlIgnore]
		public override MessageKind Kind
		{
			get { return MessageKind.String; }
		}

		//private Int32 _Length;
		///// <summary>长度</summary>
		//public Int32 Length { get { return _Length; } set { _Length = value; } }

		private String _Value;

		/// <summary>字符串</summary>
		public String Value
		{
			get { return _Value; }
			set { _Value = value; }
		}

		#endregion

		#region -- 辅助 --

		/// <summary>已重载。</summary>
		/// <returns></returns>
		public override String ToString()
		{
			return String.Format("{0} {1}", base.ToString(), Value);
		}

		#endregion
	}
}